<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="header.jsp"%>
<shiro:authenticated>
    <script type="text/javascript" src="${ctx}/static/00100/javascripts/cloud/acctSel.js"></script>
    <!-- 云账户设置手续费 -->
<script type="text/javascript" src="${ROOT}/static/js/gopay/cloud/orderFeeUtil.js"></script>
</shiro:authenticated>

<script type="text/javascript">
    var ctx='${ctx}';
    var cashier_url = '${cashier_url}';
    var cas_server_url = '${cas_server_url}';
    var enable_fingerinfo = '${enable_fingerinfo}';
    var orderId = '<%=request.getParameter("orderId")%>';
    var orderKey = '<%=request.getParameter("orderKey")%>';
</script>
<input type="hidden" id="orderIntTxnCd" name="orderIntTxnCd" value="${order.intTxnCd }"/>
<div class="container">
    <div class="grid-960">
        <!-- 支付订单详情 -->
        <jsp:include page="content/orderDtl.jsp" flush="true"/>

<%--        <c:if test="${!empty err_msg }">
            <div class="backgroundBox-3" id="errorShowDiv">
                <span class="red">${err_msg }</span>
                <img class="close" src="${ctx}/static/img/close.png" id="closeOper"/>
            </div>
        </c:if>--%>
        <div class="payment-mode">
            <shiro:authenticated>
                    <h5>国付宝帐户支付：</h5>
                    <table class="table-tml-4">
                        <tbody>
                        <tr>
                            <td class="posiRelative">
                                <input type="radio"  id="yesAvalPay" name="yesAvalPay"  onclick="avalPayCheck(${order.merTxnAmt},this);" style='display: <c:if test="${avaAmt2 lt order.merTxnAmt}">none</c:if>'/>
                               <%--  <input type="checkbox" id="noAvalPay"   name="noAvalPay" <c:if test="${avaAmt2 eq 0}">disabled</c:if> onclick="avalPayCheck(${order.merTxnAmt},this);" style='display: <c:if test="${!(avaAmt2 lt order.merTxnAmt)}">none</c:if>'/> --%>
                                国付宝可用余额：<span id="avaAmtSpan">${avaAmt }</span>元
                                <div style="left: 50px;display: none" class="tips-12"  id="avalPayTip"></div>
                            </td>
                            <td>客户名称：${custName }</td>
                            <td>国付宝账户：
                                <c:if test="${fn:length(acctIds) eq 1}">
                                    <c:forEach items="${acctIds}" var="acct" >
                                        ${acct.acctId } | ${acct.name }
                                        <input type="hidden" name="gopayAcctIdSel" id="gopayAcctIdSel" value="${acct.acctId }"/>
                                    </c:forEach>
                                </c:if>
                                <c:if test="${fn:length(acctIds) gt 1}">
                                    <select class="width200" id="gopayAcctIdSel" name="gopayAcctIdSel" onchange="getAvaAmtByAcctId(this,${order.merTxnAmt});">
                                        <c:forEach items="${acctIds}" var="acct" >
                                            <option value="${acct.acctId }">${acct.acctId } | ${acct.name }</option>
                                        </c:forEach>
                                    </select>
                                </c:if>
                            </td>
                        </tr>
                        </tbody>
                    </table>
            </shiro:authenticated>
            
            <!-- 支付渠道 -->
            <jsp:include page="content/payChannel.jsp" flush="true"/>
        </div>
        <shiro:authenticated>
            <c:if test="${payWayBean.isSupport('02') == true}">
                <div id="expressLoginBtnDiv">
                    <button type="button" id="submitLocBtn2"  class="btn-2 marginLeft141" onclick='expressLocationSubmit("1","submitLocBtn2");'>下一步</button>
                </div>
            </c:if>
            <c:if test="${payWayBean.isSupport('01') == true }">
                <div id="bankLoginBtnDiv">
                    <button type="button" id="bankPayBtn2"  class="btn-2 marginLeft141" onclick='bankPaySubmit("bankPayBtn2");'>下一步</button>
                </div>
            </c:if>
            <c:if test="${!((payWayBean.isSupport('01') == true) or (payWayBean.isSupport('02') == true))}">
                <!--仅余额支付-->
                <form id="gopaySubmitForm2" name="gopaySubmitForm2" action="${ctx}/sec/cloud/00100/express/confirm.shtml" method="post">
                    <input type="hidden" name="orderId" id="orderId" value="<%=request.getParameter("orderId")%>"/>
                    <input type="hidden" name="formhash" id="formhash" value="${formhash }"/>
                    <input type="hidden" name="gopayUser" id="gopayUser" value=""/>
                    <input type="hidden" name="pageFrom" value="order"/>
                    <input type="hidden" name="exGopayAcctId" id="exGopayAcctId" value="${gopayAcctId}"/>
                    <input type="hidden" name="exPayWay" id="exPayWay"/>
                    <input type="hidden" name="orderKey" id="orderKey" value="<%=request.getParameter("orderKey")%>"/>
                    <button type="button" id="submitLocBtn3"  class="btn-2 marginLeft141" onclick='gopaySubmit2();'>下一步</button>
                </form>
            </c:if>
        </shiro:authenticated>
    </div>
</div>
<input type="hidden" name="loginEmail" id="loginEmail" value="${loginEmail}"/>
<input type="hidden" name="merTxnAmt" id="merTxnAmt" value="${order.merTxnAmt}"/>
<!--云账户手续费动态展示数据初始化页面  -->
<%@include file="../ViewFee.jsp"%>

<%@include file="common/footer.jsp"%>